package com.young4j.springdemo.controller;

import com.young4j.springdemo.config.bindValue.BindValueStudent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author yf
 * @Date 2018/12/26 18:26
 **/
@RestController
@RequestMapping("/bindValue")
//@ConfigurationProperties(prefix = "")
public class BindValueController {
    @Value("${student.name}")
    private String one;
    @Value("${student.id}")
    private String two;
    @Autowired
    private BindValueStudent bindValueStudent;
    @RequestMapping("/value")
    public String value(String param) {
        return "one:" + one + ",tow:" + two + ",bindValueStudent:" + bindValueStudent.toString();
    }
}
